package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/10/20 11:21
 **/
public class Day48_2_Num201_RangeBitwiseAnd {
    class Solution {
        public int rangeBitwiseAnd(int left, int right) {
            int count = 0;
            while(left != right){
                left >>= 1;
                right >>= 1;
                count++;
            }
            return left <<= count;
        }
    }
}